<form onsubmit="return false;" action="{:request()->url()}" data-auto="true" method="post" class='layui-form layui-card' autocomplete="off">
    <div class="layui-card-body padding-left-40">
        <div class="layui-form-item layui-row layui-col-space15">
            <label class="layui-col-xs4 relative">
                <span class="color-green">显示/隐藏</span>
                <select class="layui-select" name="show" required>
                    {foreach ['0'=>'隐藏','1'=>'显示'] as $k=>$v}
                    <!--{eq name='$vo.show' value='$k.""'}-->
                    <option selected value="{$k}">{$v}</option>
                    <!--{else}-->
                    <option value="{$k}">{$v}</option>
                    <!--{/eq}-->
                    {/foreach}
                </select>
            </label>
            <label class="layui-col-xs4 relative">
                <span class="color-green">类型</span>
                <select class="layui-select" name="type" required>
                    {foreach ['0'=>'轮播图'] as $k=>$v}
                    <!--{eq name='$vo.type' value='$k.""'}-->
                    <option selected value="{$k}">{$v}</option>
                    <!--{else}-->
                    <option value="{$k}">{$v}</option>
                    <!--{/eq}-->
                    {/foreach}
                </select>
            </label>
            <label class="layui-col-xs4 relative">
                <span class="color-green">链接地址（外链请加http(s) ）</span>
                <input name="url" class="layui-input" placeholder="请输入链接地址" value="{$vo.url|default=''}">
            </label>
        </div>
        <div class="layui-form-item layui-row layui-col-space15">
            <span class="color-green label-required-prev">图片（轮播: 750x390）</span>
            <div>
                <input name="zh_cn" type="hidden" value="{$vo.zh_cn|default=''}">

                <script>$('[name="zh_cn"]').uploadOneImage()</script>
            </div>
        </div>

    </div>

    <div class="hr-line-dashed"></div>
    <div class="layui-form-item text-center">
        {notempty name='vo.id'}<input type='hidden' value='{$vo.id}' name='id'>{/notempty}
        <button class="layui-btn" type='submit'>保存数据</button>
        <button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消编辑吗？" data-close>取消编辑</button>
    </div>
</form>
{block name='script'}
<script>
    window.form.render();
</script>
{/block}
